<extend name="Base/common" />
<block name="body">
  <div class="span9 page_message">
  <section id="contents"> <include file="Addons/_nav" />
    <div class="tab-content">
      <!-- 表单 -->
      <php> $post_url || $post_url = U('add?model='.$model['id'], $get_param);</php>
      <form id="form" action="" method="post" class="form-horizontal form-center" enctype="multipart/form-data">
            <div class="form-item cf toggle-aid">
                    <label class="item-label">
                                        活动名称                    <span class="check-tips">
                                            </span></label>
                    <div class="controls">
                      <div id="dynamic_select_aid"></div>
                        <select name="aid">
    <option value="0" class="toggle-data" toggle-data="请选择">请选择</option>
    <volist name="actData" id="val">
      <option value="{$val['id']}" class="toggle-data" toggle-data="">{$val['actname']}</option>
    </volist>
    </select>                    </div>
                  </div>
           <div class="form-item cf toggle-uid">
                    <label class="item-label">
                                        上传附件                    <span class="check-tips">
                                            </span></label>
                    <div class="controls">
                      <div id="dynamic_select_uid"></div>
                       <input type="file" name="field"  id="file"> </div>
                  </div>                            
        </div>
        <div class="form-item form_bh">
          <button class="btn submit-btn "  type="submit" target-form="form-horizontal">确 定</button>
        </div>
      </form>
    </div>


  </section>
  </div>
</block>
<block name="script">
  <link href="__STATIC__/datetimepicker/css/datetimepicker.css?v={:SITE_VERSION}" rel="stylesheet" type="text/css">
  <php>if(C('COLOR_STYLE')=='blue_color') echo '
  <link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css?v={:SITE_VERSION}" rel="stylesheet" type="text/css">
    ';</php>
  <link href="__STATIC__/datetimepicker/css/dropdown.css?v={:SITE_VERSION}" rel="stylesheet" type="text/css">
  <script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.js"></script>
  <script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js?v={:SITE_VERSION}" charset="UTF-8"></script>
  <script type="text/javascript">
$('#submit').click(function(){
    $('#form').submit();
});
$(function(){
	var UploadFileExts = "{$UploadFileExts}";
	//初始化上传图片插件
	initUploadImg();
	if(UploadFileExts!=""){
		initUploadFile(function(){},UploadFileExts);
	}else{
		initUploadFile();
	}
    $('.time').datetimepicker({
        format: 'yyyy-mm-dd hh:ii',
        language:"zh-CN",
        minView:0,
        autoclose:true
    });
    $('.date').datetimepicker({
        format: 'yyyy-mm-dd',
        language:"zh-CN",
        minView:2,
        autoclose:true
    });
    showTab();

	$('.toggle-data').each(function(){
		var data = $(this).attr('toggle-data');
		if(data=='') return true;

	     if($(this).is(":selected") || $(this).is(":checked")){
			 change_event(this)
		 }
	});
	$('.toggle-data').bind("click",function(){ change_event(this) });
	$('select').change(function(){
		$('.toggle-data').each(function(){
			var data = $(this).attr('toggle-data');
			if(data=='') return true;

			 if($(this).is(":selected") || $(this).is(":checked")){
				 change_event(this)
			 }
		});
	});
});
</script>
</block>
